﻿using System;
using System.Collections.Generic;
using System.Text;
using JsonSharp;
using Barbar.MapReport.Common.Drawing;
using JsonSharp.Collections;
using JsonSharp.Values;

namespace Barbar.MapReport.HtmlRender.Json {
  internal class GeoValueRegionFactory : GeoRegionFactory {
    private BusinessRegionList m_Region;

    public GeoValueRegionFactory(BusinessRegionList region) : base(region) {
      m_Region = region;
    }

    public override JsonValue ToJsonObject() {
      JsonObjects result = (JsonObjects)base.ToJsonObject();
      result.Add(new JsonStringValue("Value"), new JsonNumberValue(m_Region.Value));
      return result;
    }
  }
}
